package hello.controller;

import hello.base.SpringContextUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.spring.web.plugins.Docket;

@Api(tags = "测试相关")
@Controller
public class TestController {

    @GetMapping("/getSwaggerBean")
    @ApiOperation(value = "尝试获取swagger实体bean")
    @ResponseBody
    public Docket getSwaggerBean() {
        Docket docket = (Docket) SpringContextUtil.getBean("createRestApi");
        return docket;
    }


}